package spring.cloud.service.resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * Created with IntelliJ IDEA.
 * User: jiangfei
 * Date: 16-11-3
 * Time: 下午2:25
 * To change this template use File | Settings | File Templates.
 */

@RestController
@RequestMapping("/hello")
public class HelloResource {
    @RequestMapping(value = "/hello_server",method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
    public javax.ws.rs.core.Response hello_say(@RequestParam("owner") String owner){
        System.out.println("Param : "+owner);
        return javax.ws.rs.core.Response.status(200).entity("hello tim !!!").type("application/json").build();
    }
}
